#include <iostream>
#include<string>
#include <signal.h>
using namespace std;
int main(int argc, char *argv[])
{
    if (argc!= 3)
    {
      cout<<"Usage: mykill pid signal"<<endl;
      return 1;
    } 
    int signum=std::stoi(argv[1]);
    pid_t pid=std::stoi(argv[2]);
    if (kill(pid,signum)<0)
    {
        cout<<"kill failed"<<endl;
    }
    else{
        cout<<"send"<<pid<<" signal "<<signum<<endl;
    }
    return 0;
}
